# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=recentfilecache-parser
pkgver=2.5e22518
pkgrel=4
pkgdesc='Python parser for the RecentFileCache.bcf on Windows.'
groups=('blackarch' 'blackarch-forensic')
arch=('any')
url='https://github.com/prolsen/recentfilecache-parser'
license=('custom:unknown')
depends=('python2')
makedepends=('git')
source=("$pkgname::git+https://github.com/prolsen/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

prepare() {
  cd $pkgname

  sed -i '1s/^/#!\/usr\/bin\/env python2\n/' rfcparse.py
}

package() {
  cd $pkgname

  install -Dm 755 rfcparse.py "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
}

